<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%@ include file="../../pccommon.jsp"%>    
<!DOCTYPE html >
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>星昊网站</title>
<link type="text/css" rel="stylesheet" href="${staticPath}/pccss/style.css" />
<link rel="stylesheet" type="text/css" href="${staticPath}/pccss/base.css" />
<style type="text/css">
<!--
#category_ul{
   display: block;
}
#right_nav{
   display: block;
}
.link_image{
	cursor: pointer;
}
-->
</style>
</head>
<body>
  <div id="wrapper">
  <!--head end-->
  <!--nav end-->
  <c:import url="../layout/header1.jsp?indexFlag=1"></c:import>
  <c:set var="emptyUrl" value=""></c:set>
  <div class="banner">
    <div class="b-img">
    	<c:set var="classKey" value="indexClass201" />
    	<c:set var="dataKey" value="dataListOfIndexClass${indexClassMap[classKey][0].id}" />
	     <c:forEach items="${indexDataMap[dataKey]}" var ="bannerData" >
	    	<a href="javascript:toLink('${bannerData.dataType}','${bannerData.dataId}','1','${10==indexData.dataType?indexData.dataName:emptyUrl}');" style="background:url(${bannerData.image}) center no-repeat;"></a>
	     </c:forEach>
    </div>
    <div class="b-list"></div>
     <a class="bar-left" href="#"><em></em></a><a class="bar-right" href="#"><em></em></a> 
  </div>
 
  <div class="pic">
    <div class="pic1">
   	<c:set var="classKey" value="indexClass202" />
   	<c:set var="dataKey" value="dataListOfIndexClass${indexClassMap[classKey][0].id}" />
     <c:forEach items="${indexDataMap[dataKey]}" var ="adData" step="1" begin="0" end="2">
      	<div class="pic2"><a href="javascript:toLink('${adData.dataType}','${adData.dataId}','1');" ><img src="${adData.image}" /></a></div>
     </c:forEach>
    </div>
  </div>
  <!--banner end-->
  <div style="clear: both;"></div>
 <div id="main">
  <c:forEach items="${indexClasses}" var="indexClass">
  	<c:choose>
  		<c:when test="${indexClass.showType==203}">
  		<!-- 转盘图 -->
  		  <div class="titlen"><img  class="link_image" height="24px;" src="${indexClass.image}" onclick="javascript:toClassLink('${indexClass.dataType}','${indexClass.dataId}','1');" /><a href="javascript:toClassLink('${indexClass.dataType}','${indexClass.dataId}','1');" >更多》</a></div>
		  <!-- 代码 开始 -->
		  <div id="jsCarousel">
		  	<c:set var ="dataKey" value="dataListOfIndexClass${indexClass.id}" />
		  	<c:forEach items="${indexDataMap[dataKey]}" var = "indexData" >
			<div class="lunbo1">
				<div class="lunbo2">
					<a href="javascript:toLink('${indexData.dataType}','${indexData.dataId}','1','${10==indexData.dataType?indexData.dataName:emptyUrl}');" >
						<img src="${indexData.image}"/>
					</a>
				</div>
		        <div class="lunbo3">
		          <p>${indexData.title}</p>
		          <c:set var="temKey" value="goodsId${indexData.dataId}"/>
				  <h3><!--TODO 6.5折 --></h3>
				  <span>￥<fmt:formatNumber value="${goodsMapWithIdKey[temKey][0].price/100}" pattern="0.00"/> </span>
		          <input type="button" onclick ="javascript:toLink('${indexData.dataType}','${indexData.dataId}','1','${10==indexData.dataType?indexData.dataName:emptyUrl}');" style="cursor: pointer;"  class="lunbobtn"  />
		        </div>
		    </div>
		  	</c:forEach>
		  </div>
		  <div id="demo-side-bar"></div>
		  <!-- 代码 结束 -->
  		</c:when>
  		<c:when test="${indexClass.showType==204}">
		  <div class="titlen"><img class="link_image" height="24px;" src="${indexClass.image}" onclick="javascript:toClassLink('${indexClass.dataType}','${indexClass.dataId}','1');"/><a href="javascript:toClassLink('${indexClass.dataType}','${indexClass.dataId}','1');" >更多》</a></div>
		  <div class="main1">
		    <c:set var ="dataKey" value="dataListOfIndexClass${indexClass.id}1" />
		    <div class="main1left">
		     	<c:forEach items="${indexDataMap[dataKey]}" var="indexData">
			      <a href="javascript:toLink('${indexData.dataType}','${indexData.dataId}','1','${10==indexData.dataType?indexData.dataName:emptyUrl}');" ><img  height="400px" width="280px" src="${indexData.image}"  /></a>
		     	</c:forEach>
		    </div>
		    <div class="main1min">
			    <c:set var ="dataKey" value="dataListOfIndexClass${indexClass.id}2" />
			    <c:forEach items="${indexDataMap[dataKey]}" var="indexData">
			      <a href="javascript:toLink('${indexData.dataType}','${indexData.dataId}','1','${10==indexData.dataType?indexData.dataName:emptyUrl}');"  style="cursor:pointer;">
				      <div class="main1min2">
				        <img src="${indexData.image}"  />
				        <p>${indexData.title}</p>
				         <c:set var="temKey" value="goodsId${indexData.dataId}"/>
				        <h3><fmt:formatNumber value="${goodsMapWithIdKey[temKey][0].price/100}" pattern="0.00"/></h3>
				        <!-- 
				        <span><fmt:formatNumber value="${goodsMapWithIdKey[temKey][0].price/100}" pattern="0.00"/></span>
				         -->
				      </div>
			     </a>
			    </c:forEach>
		    </div>
		    <div class="main1right">
		    	<h3>热门品牌 </h3>
			<c:set var ="dataKey" value="dataListOfIndexClass${indexClass.id}3" />
			<c:forEach items="${indexDataMap[dataKey]}" var="indexData">
			    <a href="javascript:toLink('${indexData.dataType}','${indexData.dataId}','1','${10==indexData.dataType?indexData.dataName:emptyUrl}','${indexClass.dataId}');" ><img src="${indexData.image}" /></a>
		    </c:forEach>
		      <span><a href="javascript:toClassLink('2','${indexClass.dataId}','1');" ><img src="${staticPath}/pcimages/more.gif" /></a></span>
		    </div>
		  </div>
		  <!-- main1 end -->
  		</c:when>
	  <c:when test="${indexClass.showType==205}">
		  <div class="main2">
		    <div class="main2nav"><h1>${indexClass.title}</h1></div>
		    <div class="main2nav2"></div>
		    <div class="main21">
		      <c:set var ="dataKey" value="dataListOfIndexClass${indexClass.id}" />
			  <c:forEach items="${indexDataMap[dataKey]}" var="indexData">
				  <a href="javascript:toLink('${indexData.dataType}','${indexData.dataId}','','${10==indexData.dataType?indexData.dataName:emptyUrl}');" target="_blank"><img src="${indexData.image}" /></a>
			  </c:forEach>
		    </div>
		  </div>
	  </c:when>
  	</c:choose>
  </c:forEach>
 </div>
  <!-- main end -->
  <c:import url="../layout/footer.jsp"></c:import>
  <!-- footer end -->
 </div>

<!--[if lte IE 8]>
<script src="js/ieBetter.js"></script>
<![endif]-->
<script src="${staticPath}/pcjs/banner.js" type="text/javascript"></script>
<script src="${staticPath}/pcjs/jscarousel.js" type="text/javascript"></script>
<script type="text/javascript" src="${staticPath}/pcjs/common.js"></script>
<script type="text/javascript" src="${staticPath}/js/app/index/pcindex.js"></script>
<script type="text/javascript">
$(document).ready(function() {
	$('#jsCarousel').jsCarousel({ onthumbnailclick: function(src) { 
		// 可在这里加入点击图片之后触发的效果
		$("#overlay_pic").attr('src', src);
		$(".overlay").show();
		}, autoscroll: true ,itemstodisplay:4,delay:5000});
		
		$(".overlay").click(function(){
			$(this).hide();
		});
});
</script>
</body>

</html>